package com.zf.wms.nservice.client;

import com.zf.wms.nservice.client.hystrix.RoleClientHystrix;
import com.zf.wms.nservice.dto.RoleDto;
import com.zf.wms.nservice.utils.ResultMap;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * Author：sl
 * Date：2019-11-04 9:11
 * Description：<描述>
 */
@FeignClient(name = "wms-purview", url = "localhost:9002/", fallback = RoleClientHystrix.class)
public interface RoleClient {


    @PostMapping("/role/add")
    public ResultMap addRole(@RequestParam("roleName")String roleName);

    @GetMapping("/role/list")
    ResultMap getRoleList(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize);

    @DeleteMapping("/role/removeRoleById")
    ResultMap removeRoleById(@RequestParam("roleId") Long roleId);

    @PutMapping("/role/modifyRoleById")
    ResultMap modifyRoleById(@RequestBody RoleDto roleDto);

    @GetMapping("/role/getListByRoleName")
    ResultMap getListByRoleName(@RequestParam("pageNum")Integer pageNum, @RequestParam("pageSize")Integer pageSize, @RequestParam("roleName")String roleName);
}
